function validateTest(str){
    let stack = [];
    let textLength = str.length; // 取出文本长度
    for (let i = 0; i < textLength; i++) {
        if(stack.length && (stack[stack.length - 1] === "(" && str[i] == ")")){
            stack.pop();
        }else{
            stack.push(str[i])
        }
    }
}
